package com.ws.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("demo")
public class DemoWebSocketController {

    /**
     * 显示websocket 脚本页面
     * @param modelAndView view对象
     * @return view对象
     */
    @GetMapping("page")
    public ModelAndView page(ModelAndView modelAndView) {
        modelAndView.setViewName("page");
        return modelAndView;
    }
}
